﻿Public Class Ngarante

    Public Function cargarGarante(ByVal item As Entidades.Egarante) As Boolean

        Dim oDatos As New Datos.Dgarante
        Dim oGarante As New List(Of Entidades.Egarante)
        Dim band As Boolean
        Try

            band = oDatos.insertarGarante(item)
        Catch ex As Exception
            Throw New ArgumentException(ex.Message)
        Finally
            oDatos = Nothing
        End Try
        Return band
    End Function
    Public Function comboloc() As DataTable
        Dim oDatos As New Datos.Dgarante
        Try
            Return oDatos.llenarcombo
        Catch ex As Exception
            Throw New ArgumentException(ex.Message)
        Finally
            oDatos = Nothing
        End Try
    End Function

    Public Function busquedanombre(ByVal nom As String) As DataTable
        Dim oDatos As New Datos.Dgarante
        Try
            Return oDatos.busquedaxnombregarante(nom)
        Catch ex As Exception
            Throw New ArgumentException(ex.Message)
        Finally
            oDatos = Nothing
        End Try
    End Function
    Public Function busquedadni(ByVal dni As String) As DataTable
        Dim oDatos As New Datos.Dgarante
        Try
            Return oDatos.busquedaxdnigarante(dni)
        Catch ex As Exception
            Throw New ArgumentException(ex.Message)
        Finally
            oDatos = Nothing
        End Try
    End Function

End Class
